/*
 * Copyright (c) 2023 iQi.Co.Ltd. All rights reserved.
 */
 
using IQIGame.Onigao.Framework;
using System.Collections.Generic;
using System.Linq;
using System;
using NetProtocol.Enum;

namespace NetProtocol.POD {

	/// <summary>
	///  逻辑服通知玩家离开关卡
	/// module : structs_internal
	/// </summary>
	public class NotifyLeaveLevelPOD : IPOD 
    {
        public readonly static Func<NotifyLeaveLevelPOD> FACTORY = () => new NotifyLeaveLevelPOD();
		public static Func<NotifyLeaveLevelPOD> DynamicFactory = FACTORY;
        
		/*-- members --*/
		/// <summary>
        /// 
        /// </summary>
		public long levelId;
		/// <summary>
        /// 
        /// </summary>
		public long pid;
		
		
		
		/*-- constructors --*/
		public NotifyLeaveLevelPOD() {}
		public NotifyLeaveLevelPOD(long levelId, long pid) {
			this.levelId = levelId;
			this.pid = pid;
		}
	      public void Serial(SOutputStream _out) {
            _out.Write_long(levelId);
            _out.Write_long(pid);
        }
        
        public void UnSerial(SInputStream _in) {
            if(!_in.HasRemaining()) return;
            levelId = _in.Read_long();
            if(!_in.HasRemaining()) return;
            pid = _in.Read_long();
        }
		
		public NotifyLeaveLevelPOD Clone() {
            NotifyLeaveLevelPOD o = DynamicFactory();
            o.levelId = levelId;
            o.pid = pid;
            return o;
        }
        
        public void Clear() {
            levelId = default;
            pid = default;
        }
		
        public override string ToString() {
			string str = "";
			str += "NotifyLeaveLevelPOD [";
			str += "levelId=";
			str += levelId;
			str += ", pid=";
			str += pid;
			str += "]";
			return str;
		}
		
	}
}